package com.example.foobar.dao.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.foobar.business.service.DaRetentionRatesService;
import com.example.foobar.dto.RetentionRateDTO;
import com.example.foobar.entity.DaRetentionRates;
import com.example.foobar.param.DaRetentionRatesPageParam;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.framework.core.pagination.Paging;

import java.util.Date;
import java.util.List;

/**
 * 留存率记录 服务类
 *
 * @author 郑英奔
 * @since 2021-06-04
 */
public interface DaRetentionRatesDaoService extends BaseService<DaRetentionRates>{

    /**
     * 保存
     *
     * @param daRetentionRates
     * @return
     * @throws Exception
     */
    boolean saveDaRetentionRates(DaRetentionRates daRetentionRates);

    /**
     * 修改
     *
     * @param daRetentionRates
     * @return
     * @throws Exception
     */
    boolean updateDaRetentionRates(DaRetentionRates daRetentionRates);

    /**
     * 删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    boolean deleteDaRetentionRates(Long id);


    /**
     * 获取分页对象
     *
     * @param daRetentionRatesPageParam
     * @return
     * @throws Exception
     */
    Paging<DaRetentionRates> getDaRetentionRatesPageList(DaRetentionRatesPageParam daRetentionRatesPageParam);

    List<RetentionRateDTO> getStroyRetentonRates(String uniacid, Date startDate, Date endDate);

    int selectCount(LambdaQueryWrapper<DaRetentionRates> wrapper);
}
